package com.bzsg.rightsManagementSystem.dao

import org.apache.ibatis.annotations.Delete
import org.apache.ibatis.annotations.Insert
import org.apache.ibatis.annotations.Mapper

@Mapper
interface PermissionPathRelationDao {
    @Delete(
        "  delete\n" +
                "        from permission_path_relation\n" +
                "        where permission_id = #{permissionId}"
    )
    fun deleteAllPermissionPathRelationByPermissionId(permissionId: Int)

    @Insert(
        "   insert into permission_path_relation(permission_id, path_id)\n" +
                "        values (#{permissionId}, #{requestPathId})"
    )
    fun addPermissionPathRelation(permissionId: Int, requestPathId: Int)
}